/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.me.latincatholicprayersandroid;


import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.ArrayAdapter;



/**
 *
 * @author christopher
 */
public class LatinCatholicPrayers extends Activity implements OnClickListener{

    private TextView txtDisplayPrayer;
    private Button btnShowLatinPrayer;
    private Button btnShowEnglishPrayer;
    Spinner s;
    ArrayAdapter adapter;
    private String array_spinner[];

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
    

        array_spinner=new String[5];
        array_spinner[0]="1";
        array_spinner[1]="2";
        array_spinner[2]="3";
        array_spinner[3]="4";
        array_spinner[4]="5";
        Spinner s = (Spinner) findViewById(R.id.spinWordChoice);
        ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_spinner_item, array_spinner);
        s.setAdapter(adapter);

        // ToDo add your GUI initialization code here
        btnShowLatinPrayer = (Button)findViewById(R.id.btnShowLatinPrayer);
        btnShowLatinPrayer.setOnClickListener(this);
        btnShowEnglishPrayer = (Button)findViewById(R.id.btnShowEnglishPrayer);
        btnShowEnglishPrayer.setOnClickListener(this);

        TextView txtDisplayPrayer = (TextView)findViewById(R.id.txtDisplayPrayer);
  
        

    }

    public void onClick(View v) {

        switch (v.getId()) {
            case R.id.btnShowLatinPrayer:
                txtDisplayPrayer.setText("@string/latin_prayer");
                this.txtDisplayPrayer.invalidate();
                break;
            case R.id.btnShowEnglishPrayer:
                txtDisplayPrayer.setText("@string/english_prayer");
                this.txtDisplayPrayer.invalidate();
                break;

        }
    }
   
    }
   

